<template>
  <el-config-provider :locale="locale">
    <div id="app" v-loading="appStore.isLoading" element-loading-text="加载中...">
      <!-- 路由视图 -->
      <router-view />
      
      <!-- 全局通知 -->
      <Notification />
    </div>
  </el-config-provider>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { useAppStore } from '@/stores/app'
import Notification from '@/components/common/Notification.vue'

const locale = ref(zhCn)
const appStore = useAppStore()

// 初始化应用
onMounted(() => {
  appStore.initialize()
})
</script>

<style scoped>
#app {
  min-height: 100vh;
}
</style>